#include "DescriptorContainer.h"

//descriptoren
#include "DescriptorParticle.h"
#include "DescriptorTool.h"


//prototyp partikel
#include "ParticleAdhesive.h"
#include "ParticleAdhesiveContent.h"
#include "ParticleContent.h"
#include "ParticleSimple.h"


//normale materialien
#include "ParticleCarbon.h"
#include "ParticleCeramic.h"
#include "ParticleSimple.h"
#include "ParticleGlass.h"
#include "ParticleSteel.h"

//normal technische baelemente
#include "ParticleBattery.h"
#include "ParticleObserver.h"
#include "ParticleDirector.h"
#include "ParticleExplosiveHeavy.h"
#include "ParticleExplosiveLight.h"
#include "ParticleHeater.h"
#include "ParticleJet.h"
#include "ParticleGun.h"
#include "ParticleSignalKey.h"
#include "ParticleSignalLine0.h"
#include "ParticleSignalLine1.h"

#include "ParticleSignalLine0To1.h"
#include "ParticleSignalLine1To0.h"

#include "ParticleSignalLineBoth.h"
#include "ParticleSwitch.h"
#include "ParticleSensorDown.h"
#include "ParticleSensorObserver.h"

#include "ParticleVictoryKeepAll.h"
#include "ParticleVictoryDestroyAll.h"

#include "ParticleProjectile.h"


//tools/
#include "ToolBrush.h"
#include "ToolCopy.h"
#include "ToolConnector.h"
//#include "ToolHexCopy.h"
//#include "ToolSingle.h"

using namespace ParticleEngine;

DescriptorContainer::DescriptorContainer()
{	/*
	//partikel entfernen
	AddToRegister(&ParticleAdhesive::Descriptor);
	AddToRegister(&ParticleAdhesiveContent::Descriptor);
	AddToRegister(&ParticleContent::Descriptor);
	AddToRegister(&ParticleSimple::Descriptor);

	//normale materialien
	AddToRegister(&ParticleCarbon::Descriptor);
	AddToRegister(&ParticleCeramic::Descriptor);
	AddToRegister(&ParticleSimple::Descriptor);
	AddToRegister(&ParticleGlass::Descriptor);
	AddToRegister(&ParticleSteel::Descriptor);

	//normal technische baelemente
	AddToRegister(&ParticleBattery::Descriptor);
	AddToRegister(&ParticleObserver::Descriptor);
	AddToRegister(&ParticleDirector::Descriptor);
	AddToRegister(&ParticleExplosiveHeavy::Descriptor);
	AddToRegister(&ParticleExplosiveLight::Descriptor);
	AddToRegister(&ParticleHeater::Descriptor);
	//AddToRegister(&ParticleJet::Descriptor);
	//AddToRegister(&ParticleGun::Descriptor);
	//AddToRegister(&ParticleSignalKey::Descriptor);
	//AddToRegister(&ParticleSignalLine0::Descriptor);
	//AddToRegister(&ParticleSignalLine1::Descriptor);
	//AddToRegister(&ParticleSignalLine0To1::Descriptor);
	//AddToRegister(&ParticleSignalLine1To0::Descriptor);
	//AddToRegister(&ParticleSignalLineBoth::Descriptor);
	//AddToRegister(&ParticleSwitch::Descriptor);
	//AddToRegister(&ParticleSensorDown::Descriptor);
	//AddToRegister(&ParticleSensorObserver::Descriptor);


	//speozielle partikel
	AddToRegister(&ParticleProjectile::Descriptor);

	AddToRegister(&ParticleVictoryKeepAll::Descriptor);
	AddToRegister(&ParticleVictoryDestroyAll::Descriptor);
	*/
	//tools
	AddToRegister(&ToolBrush::Descriptor);
	AddToRegister(&ToolCopy::Descriptor);
	AddToRegister(&ToolConnector::Descriptor);
	//AddToRegister(&ToolHexCopy::Descriptor);
}

const DescriptorParticle* DescriptorContainer::GetParticleDescriptor(std::string Name)
{
	return ParticleRegister[Name];
}

const DescriptorTool* DescriptorContainer::GetToolDescriptor(std::string Name)
{
	return ToolRegister[Name];
}

void DescriptorContainer::AddToRegister(const DescriptorParticle *NewDescriptor)
{
	ParticleRegister[NewDescriptor->Name] = NewDescriptor;
}

void DescriptorContainer::AddToRegister(const DescriptorTool *NewDescriptor)
{
	ToolRegister[NewDescriptor->Name] = NewDescriptor;
}